package org.rency.common.utils.domain;

import java.io.Serializable;

import org.apache.commons.lang.builder.ToStringBuilder;
import org.apache.commons.lang.builder.ToStringStyle;

/**
 * 键值对
 * @author: user_rcy@163.com
 * </br>Created on 2015年12月22日
 * @version: V1.0.0
 * @since JDK 1.8
 */
public class Kvp implements Serializable {
    private static final long serialVersionUID = -1192195739822408992L;
    /** 键 */
    private String            key;
    /** 值 */
    private String            value;

    /**
     * 默认构造
     */
    public Kvp() {
    }

    /**
     * 根据键值构造
     * @param key
     * @param value
     */
    public Kvp(String key, String value) {
        this.key = key;
        this.value = value;
    }

    public String getKey() {
        return key;
    }

    public void setKey(String key) {
        this.key = key;
    }

    public String getValue() {
        return value;
    }

    public void setValue(String value) {
        this.value = value;
    }
    
    @Override
    public String toString(){
		return ToStringBuilder.reflectionToString(this, ToStringStyle.SHORT_PREFIX_STYLE);
	}
}
